﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using FluentValidation;
using CashFlow.ShopManage.Models;
using CashFlow.ShopManage.Common;

namespace CashFlow.ShopManage.Validator
{
    public class InvitationCodeModelValidator
        : AbstractValidator<InvitationCodeModel>
    {
        public InvitationCodeModelValidator()
        {
            RuleFor(x => x.InvitationCode).Must(x => RegExpTool.IsInvitationCode(x))
                .WithMessage("非法InvitationCode");
        }
    }
}